﻿Public Class frmCrypt

    Private Sub BtnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnOK.Click
        Try
            Me.TxtPassword.Text = Crypto.Encrypt(Me.TxtString.Text, "sys11266")
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

    End Sub

    Private Sub BtnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnCancel.Click
        Me.Dispose()
    End Sub

    Private Sub TxtString_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TxtString.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.TxtPassword.Text = Crypto.Encrypt(Me.TxtString.Text, "sys11266")
        End If
    End Sub

    Private Sub TxtString_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TxtString.TextChanged

    End Sub
End Class